<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ADF4351: ADF4351 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ADF4351
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classADF4351.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classADF4351-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ADF4351 Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classADF4351.html" title="ADF4351 chip device driver. ">ADF4351</a> chip device driver.  
 <a href="classADF4351.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="adf4351_8h_source.html">adf4351.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7643815c097feb5c0e1a790fe461ba04"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a7643815c097feb5c0e1a790fe461ba04">ADF4351</a> (byte pin, uint8_t mode, unsigned long speed, uint8_t order)</td></tr>
<tr class="separator:a7643815c097feb5c0e1a790fe461ba04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fcae5cc94306e5277180480177a1860"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a3fcae5cc94306e5277180480177a1860">init</a> ()</td></tr>
<tr class="separator:a3fcae5cc94306e5277180480177a1860"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95d523b7e6acb426be5ae57f37af55c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a95d523b7e6acb426be5ae57f37af55c4">setf</a> (uint32_t freq)</td></tr>
<tr class="separator:a95d523b7e6acb426be5ae57f37af55c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab76d60048352b333b88fb1f50e1c07de"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ab76d60048352b333b88fb1f50e1c07de">setrf</a> (uint32_t f)</td></tr>
<tr class="separator:ab76d60048352b333b88fb1f50e1c07de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6a0f27d1f6d43824909a48f4f119083"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#aa6a0f27d1f6d43824909a48f4f119083">enable</a> ()</td></tr>
<tr class="separator:aa6a0f27d1f6d43824909a48f4f119083"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1df660e6fa9df790c1d5e6e4da76f263"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a1df660e6fa9df790c1d5e6e4da76f263">disable</a> ()</td></tr>
<tr class="separator:a1df660e6fa9df790c1d5e6e4da76f263"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bf4e56c8c18fe34224aa0e8b3771c71"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a3bf4e56c8c18fe34224aa0e8b3771c71">writeDev</a> (int n, <a class="el" href="classReg.html">Reg</a> r)</td></tr>
<tr class="separator:a3bf4e56c8c18fe34224aa0e8b3771c71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2679bffd8ac1bf48beaa615a14901df"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ab2679bffd8ac1bf48beaa615a14901df">getReg</a> (int n)</td></tr>
<tr class="separator:ab2679bffd8ac1bf48beaa615a14901df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23f89801e9fc100d6934462634ea33e1"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a23f89801e9fc100d6934462634ea33e1">gcd_iter</a> (uint32_t u, uint32_t v)</td></tr>
<tr class="separator:a23f89801e9fc100d6934462634ea33e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a6c01a0a0b9e571ed2fcb3ab6b283c035"><td class="memItemLeft" align="right" valign="top">SPISettings&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a6c01a0a0b9e571ed2fcb3ab6b283c035">spi_settings</a></td></tr>
<tr class="separator:a6c01a0a0b9e571ed2fcb3ab6b283c035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f1ce870a2dde37879cc68a3d44077e"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a34f1ce870a2dde37879cc68a3d44077e">pinSS</a></td></tr>
<tr class="separator:a34f1ce870a2dde37879cc68a3d44077e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6975d7003c00cae53aa7b715c0ec7626"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classReg.html">Reg</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a6975d7003c00cae53aa7b715c0ec7626">R</a> [6]</td></tr>
<tr class="separator:a6975d7003c00cae53aa7b715c0ec7626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae193f6c428b08b4bcc575bb75fd57e50"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ae193f6c428b08b4bcc575bb75fd57e50">reffreq</a></td></tr>
<tr class="separator:ae193f6c428b08b4bcc575bb75fd57e50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5262f0237c1cc9ffff1dfbd4e60378d"><td class="memItemLeft" align="right" valign="top">byte&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ae5262f0237c1cc9ffff1dfbd4e60378d">enabled</a></td></tr>
<tr class="separator:ae5262f0237c1cc9ffff1dfbd4e60378d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57fab16640da4fec6ffe5c973519ca1a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a57fab16640da4fec6ffe5c973519ca1a">cfreq</a></td></tr>
<tr class="separator:a57fab16640da4fec6ffe5c973519ca1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a738378ef729516c9f0bad6cb7f953f71"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a738378ef729516c9f0bad6cb7f953f71">N_Int</a></td></tr>
<tr class="separator:a738378ef729516c9f0bad6cb7f953f71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99833499e1751c1c872a6a287032affa"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a99833499e1751c1c872a6a287032affa">Frac</a></td></tr>
<tr class="separator:a99833499e1751c1c872a6a287032affa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab698c43d1ddb334096eff115fae15eb1"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ab698c43d1ddb334096eff115fae15eb1">Mod</a></td></tr>
<tr class="separator:ab698c43d1ddb334096eff115fae15eb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1932af873741a34149a9a9bad49a92d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#aa1932af873741a34149a9a9bad49a92d">PFDFreq</a></td></tr>
<tr class="separator:aa1932af873741a34149a9a9bad49a92d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55d45b0690f76c5ea388773dee240863"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a55d45b0690f76c5ea388773dee240863">ChanStep</a></td></tr>
<tr class="separator:a55d45b0690f76c5ea388773dee240863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2689d27e27f23a733d6159c8c200a917"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a2689d27e27f23a733d6159c8c200a917">outdiv</a></td></tr>
<tr class="separator:a2689d27e27f23a733d6159c8c200a917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaff6d6ab2b6672ded1ea14b1eec926d6"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#aaff6d6ab2b6672ded1ea14b1eec926d6">RD2refdouble</a></td></tr>
<tr class="separator:aaff6d6ab2b6672ded1ea14b1eec926d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa383629085467921a19580df15e99490"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#aa383629085467921a19580df15e99490">RCounter</a></td></tr>
<tr class="separator:aa383629085467921a19580df15e99490"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d0b97a7d30a009649cfad8c8d38c7a"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a92d0b97a7d30a009649cfad8c8d38c7a">RD1Rdiv2</a></td></tr>
<tr class="separator:a92d0b97a7d30a009649cfad8c8d38c7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab32ef68d624ac45d4e3457b4d6a02085"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ab32ef68d624ac45d4e3457b4d6a02085">BandSelClock</a></td></tr>
<tr class="separator:ab32ef68d624ac45d4e3457b4d6a02085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4723cc8e22e40139d626e0e9c892314"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#ab4723cc8e22e40139d626e0e9c892314">ClkDiv</a></td></tr>
<tr class="separator:ab4723cc8e22e40139d626e0e9c892314"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14d34fc7b187525fa4b1edbdf11a6b80"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a14d34fc7b187525fa4b1edbdf11a6b80">Prescaler</a></td></tr>
<tr class="separator:a14d34fc7b187525fa4b1edbdf11a6b80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55e2d691cdb4fe2409b9597e6cfaacf8"><td class="memItemLeft" align="right" valign="top">byte&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classADF4351.html#a55e2d691cdb4fe2409b9597e6cfaacf8">pwrlevel</a></td></tr>
<tr class="separator:a55e2d691cdb4fe2409b9597e6cfaacf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classADF4351.html" title="ADF4351 chip device driver. ">ADF4351</a> chip device driver. </p>
<p>This class provides the overall interface for <a class="el" href="classADF4351.html" title="ADF4351 chip device driver. ">ADF4351</a> chip. It is used to define the SPI connection, initalize the chip on power up, disable/enable frequency generation, and set the frequency and reference frequency.</p>
<p>The PLL values and register values can also be set directly with this class, and current settings for the chip and PLL can be read.</p>
<p>As a simple frequency generator, once the target frequency and desired channel step value is set, the library will perform the required calculations to set the PLL and other values, and determine the mode (Frac-N or Int-N) for the PLL loop. This greatly simplifies the use of the <a class="el" href="classADF4351.html" title="ADF4351 chip device driver. ">ADF4351</a> chip.</p>
<p>The <a class="el" href="classADF4351.html" title="ADF4351 chip device driver. ">ADF4351</a> datasheet should be consulted to understand the correct register settings. While a number of checks are provided in the library, not all values are checked for allowed settings, so YMMV. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00105">105</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7643815c097feb5c0e1a790fe461ba04"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ADF4351::ADF4351 </td>
          <td>(</td>
          <td class="paramtype">byte&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>speed</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>order</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor creates an object and sets the SPI parameters. see the Arduino SPI library for the parameter values. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>the SPI Slave Select Pin to use </td></tr>
    <tr><td class="paramname">mode</td><td>the SPI Mode (see SPI mode define values) </td></tr>
    <tr><td class="paramname">speed</td><td>the SPI Serial Speed (see SPI speed values) </td></tr>
    <tr><td class="paramname">order</td><td>the SPI bit order (see SPI bit order values) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00092">92</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a1df660e6fa9df790c1d5e6e4da76f263"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADF4351::disable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>turns off the output frequency (disables the CE pin) The chip is still powered up, so all settings are maintained in this mode. </p>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00324">324</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa6a0f27d1f6d43824909a48f4f119083"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADF4351::enable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>turns on the output frequency (enables the CE pin) The chip is still powered up, so all settings are maintained in this mode. </p>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00318">318</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a23f89801e9fc100d6934462634ea33e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADF4351::gcd_iter </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>u</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>calculates the greatest common denominator for two values helper function to calculate PLL values </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">u</td><td>value 1 </td></tr>
    <tr><td class="paramname">v</td><td>value 2 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the greatest common denominator </dd></dl>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00354">354</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ab2679bffd8ac1bf48beaa615a14901df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADF4351::getReg </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>gets the value of the device register </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>nth register on the device </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the current value of the register </dd></dl>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00349">349</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3fcae5cc94306e5277180480177a1860"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADF4351::init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>initialize and start the SPI interface. Call this once after instanciating the object </p>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00110">110</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a95d523b7e6acb426be5ae57f37af55c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADF4351::setf </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>freq</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>sets the output frequency automatically calculates the PLL and other parameters returns false if the desired frequency does not match the calculated frequency or is out of range.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">freq</td><td>target frequency </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>success (True or False) </dd></dl>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00120">120</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ab76d60048352b333b88fb1f50e1c07de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADF4351::setrf </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>f</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>sets the reference frequency sets the incoming reference frequency to the <a class="el" href="classADF4351.html" title="ADF4351 chip device driver. ">ADF4351</a> chip, based on your OXCO or other freqeuncy reference source value. Checks for min and max settings</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>reference frequency </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>success (True or False) </dd></dl>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00302">302</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3bf4e56c8c18fe34224aa0e8b3771c71"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADF4351::writeDev </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classReg.html">Reg</a>&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>writes the register value to the device normally used as an internal helper function </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">n</td><td>nth register to write to </td></tr>
    <tr><td class="paramname">r</td><td>the register value to write </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="adf4351_8cpp_source.html#l00331">331</a> of file <a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ab32ef68d624ac45d4e3457b4d6a02085"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADF4351::BandSelClock</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the PLL Band Select Clock Value </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00255">255</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a57fab16640da4fec6ffe5c973519ca1a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADF4351::cfreq</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stores the calculated frequency (vs the desired frequency) used to check for issues in the <a class="el" href="classADF4351.html#a95d523b7e6acb426be5ae57f37af55c4">setf()</a> function. this value is overwritten each time sef() is called. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00202">202</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a55d45b0690f76c5ea388773dee240863"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADF4351::ChanStep</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the channel step value can be directly changed to set a new frequency step from the defined steps[] array. You should not use an arbitrary value for this. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00229">229</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab4723cc8e22e40139d626e0e9c892314"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADF4351::ClkDiv</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the PLL Clock Divider value the 12bit timeout counter for activation of phase resync and fast lock. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00260">260</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae5262f0237c1cc9ffff1dfbd4e60378d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">byte ADF4351::enabled</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stores the current frequency generation on/off status </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00196">196</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a99833499e1751c1c872a6a287032affa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADF4351::Frac</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The PLL Frac value for the current frequency this value is overwritten each time sef() is called. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00212">212</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="ab698c43d1ddb334096eff115fae15eb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADF4351::Mod</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The PLL Mod value for the current frequency this value is overwritten each time sef() is called. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00217">217</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a738378ef729516c9f0bad6cb7f953f71"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t ADF4351::N_Int</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stores the PLL INT value for the current frequency this value is overwritten each time sef() is called. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00207">207</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2689d27e27f23a733d6159c8c200a917"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADF4351::outdiv</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the PLL output divider value for the current frequency this value is overwritten each time sef() is called. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00234">234</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa1932af873741a34149a9a9bad49a92d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float ADF4351::PFDFreq</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The PLL Phase Detect Freq value for the current frequency can be changed if a new reference frequency is used. </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00222">222</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a34f1ce870a2dde37879cc68a3d44077e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADF4351::pinSS</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stores the SPI Slave Select Pin </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00184">184</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a14d34fc7b187525fa4b1edbdf11a6b80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADF4351::Prescaler</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The PLL ref freq prescaler (divider) flag set to 0 or 1 </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00265">265</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a55e2d691cdb4fe2409b9597e6cfaacf8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">byte ADF4351::pwrlevel</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The power output level settings allowed values 0-4 </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00270">270</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6975d7003c00cae53aa7b715c0ec7626"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classReg.html">Reg</a> ADF4351::R[6]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>array for storing the working register values (used for writing) </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00188">188</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa383629085467921a19580df15e99490"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADF4351::RCounter</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the PLL R counter value for the current frequency 10bit counter used to divide the ref freq for the PFD </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00246">246</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a92d0b97a7d30a009649cfad8c8d38c7a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADF4351::RD1Rdiv2</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the PLL ref freq Divider by 2 sets a divide-by-2 between the Rcounter and PFD </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00251">251</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="aaff6d6ab2b6672ded1ea14b1eec926d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADF4351::RD2refdouble</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the PLL ref freq doubler flag for the current frequency it is used to double the incoming ref frequency. this should used to when setting up the reference frequency set to 0 or 1 </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00241">241</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="ae193f6c428b08b4bcc575bb75fd57e50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADF4351::reffreq</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stores the reference frequency </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00192">192</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6c01a0a0b9e571ed2fcb3ab6b283c035"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPISettings ADF4351::spi_settings</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>stores the SPI settings </p>

<p>Definition at line <a class="el" href="adf4351_8h_source.html#l00180">180</a> of file <a class="el" href="adf4351_8h_source.html">adf4351.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="adf4351_8h_source.html">adf4351.h</a></li>
<li>src/<a class="el" href="adf4351_8cpp_source.html">adf4351.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classADF4351.html">ADF4351</a></li>
    <li class="footer">Generated on Sun Jul 1 2018 15:15:39 for ADF4351 by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
